namespace ColorFillGame.Domain.Exceptions;

public class DomainException : Exception
{
    public DomainException()
    { }

    public DomainException(string message)
        : base(message)
    { }

    public DomainException(string message, Exception innerException)
        : base(message, innerException)
    { }
}

public class GameNotFoundException : DomainException
{
    public GameNotFoundException(Guid gameId)
        : base($"Game with ID {gameId} not found.")
    { }
}

public class PlayerNotFoundException : DomainException
{
    public PlayerNotFoundException(Guid playerId)
        : base($"Player with ID {playerId} not found.")
    { }
}

public class GameAlreadyStartedException : DomainException
{
    public GameAlreadyStartedException()
        : base("The game has already started.")
    { }
    
    public GameAlreadyStartedException(Guid gameId)
        : base($"Game with ID {gameId} has already started.")
    { }
}

public class GameNotInProgressException : DomainException
{
    public GameNotInProgressException()
        : base("The game is not in progress.")
    { }
}

public class InvalidPositionException : DomainException
{
    public InvalidPositionException(int x, int y)
        : base($"Position ({x}, {y}) is invalid.")
    { }
}

public class GameRoomFullException : DomainException
{
    public GameRoomFullException(Guid gameId)
        : base($"Game room with ID {gameId} is full.")
    { }
}

public class PlayerAlreadyExistsException : DomainException
{
    public PlayerAlreadyExistsException(Guid playerId)
        : base($"Player with ID {playerId} already exists in the game.")
    { }
}